package com.hushan.elevator.dao;

import com.hushan.elevator.model.DeviceDhcpConfig;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;
import java.util.List;

@Repository
public interface DeviceDhcpConfigRepository extends JpaRepository<DeviceDhcpConfig, Integer> {
    // 根据设备网络配置ID查询DHCP配置
    List<DeviceDhcpConfig> findByDeviceNetworkConfigId(Integer deviceNetworkConfigId);

    // 根据IP地址查询DHCP配置
    List<DeviceDhcpConfig> findByIpAddress(String ipAddress);

    // 根据是否删除查询DHCP配置
    List<DeviceDhcpConfig> findByIsDeleted(Boolean isDeleted);

    // 根据创建时间范围查询DHCP配置
    List<DeviceDhcpConfig> findByCreatedTimeBetween(LocalDateTime start, LocalDateTime end);

    // 根据更新时间范围查询DHCP配置
    List<DeviceDhcpConfig> findByUpdatedTimeBetween(LocalDateTime start, LocalDateTime end);
}